//
//  NSNumber+QWExtension.h
//  WJCommon-master
//
//  Created by Yunhai.Wu on 15/12/16.
//  Copyright © 2015年 WJ. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSNumber (QWExtension)

- (void) qw_times:(void(^)(void))block;
- (void) qw_timesWithIndex:(void(^)(NSUInteger index))block;

- (void) qw_upto:(int)number do:(void(^)(NSInteger number))block;
- (void) qw_downto:(int)number do:(void(^)(NSInteger number))block;

// Numeric inflections
- (NSNumber *) qw_seconds;
- (NSNumber *) qw_minutes;
- (NSNumber *) qw_hours;
- (NSNumber *) qw_days;
- (NSNumber *) qw_weeks;
- (NSNumber *) qw_fortnights;
- (NSNumber *) qw_months;
- (NSNumber *) qw_years;

// There are singular aliases for the above methods
- (NSNumber *) qw_second;
- (NSNumber *) qw_minute;
- (NSNumber *) qw_hour;
- (NSNumber *) qw_day;
- (NSNumber *) qw_week;
- (NSNumber *) qw_fortnight;
- (NSNumber *) qw_month;
- (NSNumber *) qw_year;

- (NSDate *) qw_ago;
- (NSDate *) qw_ago:(NSDate *)time;
- (NSDate *) qw_since:(NSDate *)time;
- (NSDate *) qw_until:(NSDate *)time;
- (NSDate *) qw_fromNow;

@end
